import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useAdminStore = defineStore('admin', () => {
  const userInfo = ref(null)
  const name = ref("墨枢")
  const setUserInfo = (info) => {
    userInfo.value = info
  }
  
  const clearUserInfo = () => {
    userInfo.value = null
  }
  
  return {
    userInfo,
    name,
    setUserInfo,
    clearUserInfo
  }
}) 